﻿// ===============================================================================
// DotNet.Platform 开发框架 2016 版权所有
// ===============================================================================

using System;
using DotNet.Entity;
using System.ComponentModel.DataAnnotations;

namespace DotNet.Core.Entity
{
    /// <summary>
    /// 内容字典
    /// </summary>
    [Table("内容字典")]    
    public class ContentDic
    {
		/// <summary>
        /// 主键
        /// </summary>
        [PrimaryKey]
        [Column("主键",false)]
        public string Id { get; set; }

		/// <summary>
        /// 编码
        /// </summary>
		[Column("编码")]
        [Required(ErrorMessage = "请输入编码")]
        [MaxLength(50, ErrorMessage = "编码长度不能超过{0}个字符")]
        public string Code { get; set; }

		/// <summary>
        /// 名称
        /// </summary>
		[Column("名称")]
        [Required(ErrorMessage = "请输入名称")]
        [MaxLength(100, ErrorMessage = "名称长度不能超过{0}个字符")]
        public string Name { get; set; }

		/// <summary>
        /// 内容
        /// </summary>
		[Column("内容")]
        public string Contents { get; set; }

        /// <summary>
        /// 复制对象
        /// </summary>
        public ContentDic Clone()
        {
            return (ContentDic)MemberwiseClone();
        }
    }
}
